/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.notify.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 推送用户Entity
 * @author chenbin
 * @version 2018-12-14
 */
public class NotiUser extends DataEntity<NotiUser> {
	
	private static final long serialVersionUID = 1L;
	private String id;
	private String username;		// 用户名
	private String password;		// 密码
	private String email;		// 邮箱
	private String name;		// 姓名
	private String online;		// 是否在线: 0 不在线 1在线
	private String appId;    //appid
	private String alias;    //别名
	private String tag;      //标签
	private Date createddate;		// createddate
	private Date updateddate;		// updateddate
    private Integer onlinePersons; //在线人数
	private String ip;
	private String address;    //ip获取的用户地理位置
	private String appEdition; //App版本
	private String mac; //mac地址
	private String unitModel;  //设备型号
	private String imsi; //国际移动识别号
	private String deviceId; //设备id

	public NotiUser() {
		super();
	}

	public NotiUser(String id){
		super(id);
	}

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

	@Override
	public String getId() {
		return id;
	}

	@Override
	public void setId(String id) {
		this.id = id;
	}

	@Length(min=0, max=64, message="用户名长度必须介于 0 和 64 之间")
	public String getUsername() {
		return username;
	}

    public void setUsername(String username) {
		this.username = username;
	}

	@Length(min=0, max=100, message="密码长度必须介于 0 和 100 之间")
	public String getPassword() {
		return password;
	}

    public void setPassword(String password) {
		this.password = password;
	}

	@Length(min=0, max=200, message="邮箱长度必须介于 0 和 200 之间")
	public String getEmail() {
		return email;
	}

    public void setEmail(String email) {
		this.email = email;
	}

    @Length(min=0, max=100, message="姓名长度必须介于 0 和 100 之间")
	public String getName() {
		return name;
	}

    public void setName(String name) {
		this.name = name;
	}

    @Length(min=0, max=1, message="是否在线: 0 不在线 1在线长度必须介于 0 和 1 之间")
	public String getOnline() {
		return online;
	}

	public void setOnline(String online) {
		this.online = online;
	}

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public Integer getOnlinePersons() {
        return onlinePersons;
    }

    public void setOnlinePersons(Integer onlinePersons) {
        this.onlinePersons = onlinePersons;
    }

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateddate() {
		return createddate;
	}

	public void setCreateddate(Date createddate) {
		this.createddate = createddate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getUpdateddate() {
		return updateddate;
	}

	public void setUpdateddate(Date updateddate) {
		this.updateddate = updateddate;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAppEdition() {
		return appEdition;
	}

	public void setAppEdition(String appEdition) {
		this.appEdition = appEdition;
	}

	public String getMac() {
		return mac;
	}

	public void setMac(String mac) {
		this.mac = mac;
	}

	public String getUnitModel() {
		return unitModel;
	}

	public void setUnitModel(String unitModel) {
		this.unitModel = unitModel;
	}

	public String getImsi() {
		return imsi;
	}

	public void setImsi(String imsi) {
		this.imsi = imsi;
	}

	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}
}